<div class="row">
    <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
    </div>
    <div class="row">
        <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title">注册</h3>
                </div>
                <div class="panel-body">
                    <div ng-show="rev.msg" class="alert alert-danger" role="alert">
                        {{rev.msg}}
                        <a ng-show="!rev.err" href="#/login" class="alert-link">
                            <small>请登录？</small>
                        </a>
                    </div>
                    <form class="form-horizontal" ng-submit="register()" name="registerForm" role="form">
                        <div class="form-group">
                            <label for="tUser" class="col-sm-2 control-label">用户名:</label>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                <input type="text" name="tUser" ng-model="userInfo.username" class="form-control" value="admin" ng-pattern="/^[A-Za-z0-9]{1,1}\w{4,7}$/" required>
                                <small class="text-danger">
                                    <span ng-show="registerForm.tUser.$dirty && registerForm.tUser.$invalid">
                                       用户名为[A-Za-z0-9]{1,1}\w{4,7}，长度为5-8位，
                                        <span ng-show="registerForm.tUser.$error.required">用户名是必须的。</span>
                                    </span>
                                </small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="tPass" class="col-sm-2 control-label">密码:</label>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                <input type="password" name="tPass" ng-model="userInfo.userpass" class="form-control" ng-pattern="/^[A-Za-z0-9]{1,1}\w{4,7}$/" required>
                                <small class="text-danger">
                                    <span ng-show="registerForm.tPass.$dirty && registerForm.tPass.$invalid">
                                        密码为[A-Za-z0-9]{1,1}\w{4,7}，长度为5-8位，
                                        <span ng-show="registerForm.tPass.$error.required">密码不能为空</span>
                                    </span>
                                </small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="tPass2" class="col-sm-2 control-label">密码:</label>
                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                <input type="password" name="tPass2" ng-model="userInfo.userpass2" class="form-control" required>
                                <small class="text-danger">
                                    <span ng-show="registerForm.tPass2.$dirty&&registerForm.tPass2.$invalid">
                                        <span ng-show="registerForm.tPass2.$error.required">确认密码是必须的</span>
                                    </span>
                                    <span ng-show="userInfo.userpass!=userInfo.userpass2">两次密码不一致！！</span>
                                </small>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-10 col-sm-offset-2">
                                <button type="submit" ng-disabled="registerForm.$invalid || userInfo.userpass!=userInfo.userpass2" class="btn btn-info">注册</button>
                                <small><a href="#/login">已有用户名，登录？</a></small>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
    </div>
</div>